<template>
	<view class="autonomous" :style="{ paddingTop: safeAreaTop + 'px' }">
		<up-navbar :title="nikename+'的人类图'" bgColor="#FFF1E3" :autoBack="true" />
		<view class="mt-1">
			<human-map />
		</view>
		<view class="content">
			<view class="menu-btn flex-r s-b">
				<button :class="{'button-normal':true,'button-active':menuIndex==0}" @click="menuIndex=0">基础解读</button>
				<button :class="{'button-normal':true,'button-active':menuIndex==1}" @click="menuIndex=1">能量中心</button>
				<button :class="{'button-normal':true,'button-active':menuIndex==2}" @click="menuIndex=2">闸门&通道</button>
				<button :class="{'button-normal':true,'button-active':menuIndex==3}" @click="menuIndex=3">行星统计</button>
			</view>
			<view class="menu-list">
				<!-- 基础解读 -->
				<view class="" v-if="menuIndex==0">
					<view class="info flex-c">
						<text>出生时间：1987@12月23日 18:45:56</text>
						<text class="mt-1">设计时间：1987@9月23日 09:4:56</text>
					</view>
					<view class="mt-1">
						<template v-for="i in [1,2,3,4,5,6,7]" :key="i">
							<view class="menu-item flex-r s-b a-c mb-1">
								<text>人生角色：探究机会主义者（1/4）</text>
								<text class="iconfont icon-zuozuo"></text>
							</view>
						</template>
					</view>
				</view>
				<!-- 能量中心 -->
				<view class="" v-else-if="menuIndex==1">
					<view class="tag flex-r a-c">
						<view />
						<text class="ml-1">有定义的中心</text>
					</view>
					<view class="mt-1">
						<template v-for="i in [1,2,3]" :key="i">
							<view class="menu-item flex-r s-b a-c mb-1">
								<text>头部中心</text>
								<view class="flex-r energy-value">
									<text class="text1"><text class="iconfont icon-diqiu" />63.3</text>
									<text><text class="iconfont icon-taiyang" />63.3</text>
									<text><text class="iconfont icon-beijiaodian" />64.5</text>
								</view>
								<text class="iconfont icon-zuozuo"></text>
							</view>
						</template>
					</view>
					<view class="tag flex-r a-c">
						<view />
						<text class="ml-1">未定义的中心</text>
					</view>
					<view class="mt-1">
						<template v-for="i in [1,2]" :key="i">
							<view class="menu-item flex-r s-b a-c mb-1">
								<text>荐骨中心</text>
								<view class="flex-r energy-value">
									<text class="text1"><text class="iconfont icon-diqiu" />63.3</text>
									<text><text class="iconfont icon-taiyang" />63.3</text>
									<text><text class="iconfont icon-beijiaodian" />64.5</text>
								</view>
								<text class="iconfont icon-zuozuo"></text>
							</view>
						</template>
					</view>
				</view>
				<!-- 闸门&通道 -->
				<view class="" v-else-if="menuIndex==2">
					<view class="tag flex-r a-c">
						<view />
						<text class="ml-1">闸门解读</text>
					</view>
					<view class="mt-1">
						<template v-for="i in [1,2,3]" :key="i">
							<view class="menu-item flex-r s-b a-c mb-1">
								<text>5号闸门：固定模式</text>
								<view class="flex-r energy-value">
									<text><text class="iconfont icon-diqiu" />64.5</text>
								</view>
								<text class="iconfont icon-zuozuo" />
							</view>
						</template>
					</view>
					<view class="tag flex-r a-c">
						<view />
						<text class="ml-1">天赋通道</text>
					</view>
					<view class="mt-1">
						<template v-for="i in [1,2]" :key="i">
							<view class="menu-item flex-r s-b a-c mb-1">
								<text>通道39-55：情绪</text>
								<view class="flex-r energy-value">
									<text><text class="iconfont icon-diqiu" />64.5</text>
								</view>
								<text class="iconfont icon-zuozuo" />
							</view>
						</template>
					</view>
				</view>
				<!-- 行星统计 -->
				<view class="" v-else-if="menuIndex==3">

				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import HumanMap from './components/map.vue'
	const props = defineProps({
		nikename: {
			type: String,
			default: ''
		}
	})
	const safeAreaTop = uni.$safeArea?.safeAreaTop || 44;
	const menuIndex = ref(0)
</script>

<style lang="scss" scoped>
	page {
		background: linear-gradient(180deg, #FFF1E3 0%, #FFF9EC 100%);
	}
	.autonomous{
		background: linear-gradient(180deg, #FFF1E3 0%, #FFF9EC 100%);
	}

	.content {
		background: #fff;

		.menu-btn {
			padding: 20rpx;
		}

		.menu-list {
			padding: 0 20rpx 20rpx;

			.info {
				font-size: 24rpx;
				background: #FFFBEA;
				border-radius: 20rpx;
				padding: 40rpx 30rpx;
			}

			.tag {
				view {
					width: 12rpx;
					height: 12rpx;
					background: #FED523;
					border-radius: 50%;
					margin-left: 10rpx;
				}

				text {
					font-weight: 500;
					font-size: 28rpx;
					color: #A6A6A6;
				}
			}

			.menu-item {
				background: #F9F9F9;
				border-radius: 20rpx;
				padding: 30rpx;

				>text,
				.iconfont {
					font-weight: 500;
					font-size: 28rpx;
				}

				.energy-value {

					text,
					.iconfont {
						font-size: 24rpx;
						color: #FA4126;
						margin-right: 10rpx;
					}

					text {
						margin-right: 16rpx;
					}

					.text1 {
						color: #000000;
					}
				}
			}
		}
	}
</style>